import Repl from '@/repl/Repl.tsx';
import CodeLink from '@/mdx-components/CodeLink.tsx';

# removeIn()

Returns a copy of the collection with the value at the key path removed.

A functional alternative to `collection.removeIn(keypath)` which will also work with plain Objects and Arrays.

<Signature code={`removeIn(collection: C, keyPath: Iterable): C;`} />

<Repl
  defaultValue={`const original = { x: { y: { z: 123 }}}
removeIn(original, ['x', 'y', 'z']) // { x: { y: {}}}`}
/>
